"""
-----------------------------
   File Name:assert_util
   Author:cwei
   date: 2023/7/28-10:07
-----------------------------
"""


class AssertUtil:
    @classmethod
    def ihrm_assert(cls, res, status_code, success, code, message):
        assert status_code == res.status_code
        assert success == res.json().get('success')
        assert code == res.json().get('code')
        assert message == res.json().get('message')

    @classmethod
    def tpshpo_assert(cls, login_res, status_code, status, msg):
        assert status_code == login_res.status_code
        assert status == login_res.json().get('status')
        assert msg == login_res.json().get('msg')

    @classmethod
    def tpshop_register_assert(cls, reg_res, status_code, status, msg):
        assert status_code == reg_res.status_code
        assert status == reg_res.json().get('status')
        assert msg == reg_res.json().get('msg')
